package year2020.month11;

import month09.Test001;

public class Threads2 extends Test001 implements Runnable {
    public void run() {
        System.out.println("run.");
        throw new RuntimeException("Problem");
    }
    public static void main(String[] args) {
        Threads2 t2 = new Threads2();
        Thread t = new Thread(t2);
        t.start();
        System.out.println("End of method.1");

//        System.out.println(t2.name);
        System.out.println(t2.text);
//        System.out.println(t2.getStr("123"));

        Test002 test2 = new Test002();
        System.out.println(test2.name);
        System.out.println(test2.text);
    }
}

class Test002{
    String name = "123";
    protected String text = "456";

    protected void set(String sname) {
        this.name = sname;
    }

    String get(){
        return name;
    }

}
